{% include "../../header.html" %}
{% include "../../navigation.html" %}

<div class="wrapper">
    <div class="container-fluid">

        <!-- Page-Title -->
        <div class="row">
            <div class="col-sm-12">
                <div class="page-title-box">
                    <div class="btn-group pull-right">
                        <h4 class="page-title">Foo Tables</h4>
                    </div>
                    <ol class="breadcrumb hide-phone p-0 m-0">
                        <li class="breadcrumb-item"><a href="#">HuntCMS</a></li>
                        <li class="breadcrumb-item"><a href="#">Tables</a></li>
                        <li class="breadcrumb-item active">Foo Tables</li>
                    </ol>
                </div>
            </div>
        </div>
        <!-- end page title end breadcrumb -->


        <div class="row">
            <div class="col-12">
                <div class="card-box">
                    <!-- <div class="row">
                        <div class="col-sm-6">
                            <div class="m-b-30">
                                <a href="/admincp/system/log/add" id="addToTable"
                                   class="btn btn-success waves-effect waves-light">Add <i
                                        class="mdi mdi-plus-circle-outline"></i></a>
                            </div>
                        </div>
                    </div> -->

                    <table class="table table-striped table-bordered toggle-circle m-b-0">
                        <thead>
                        <tr>
                            <th data-toggle="true">Id</th>
                            <th>UserId</th>
                            <th data-hide="phone">Action</th>
                            <th data-hide="phone">Params</th>
                            <th data-hide="phone, tablet">Type</th>
                            <th data-hide="phone, tablet">Time</th>
                            <th data-hide="phone, tablet">Operate</th>
                        </tr>
                        </thead>
                        <!-- <div class="form-inline m-b-20">
                            <div class="row">
                                <form action="" method="get">
                                    <div class="col-md-6 text-xs-center">
                                        <div class="form-group">
                                            <label class="control-label m-r-5">Status</label>
                                            <select id="demo-foo-filter-status" class="form-control input-sm">
                                                <option value="-1">Show all</option>
                                                <option value="1">{{ trans("COMMON_SYSTEM_ENABLED") }}</option>
                                                <option value="0">{{ trans("COMMON_SYSTEM_DISABLED") }}</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-md-6 text-center text-right">
                                        <div class="form-group float-right">
                                            <input id="demo-foo-search" type="text" placeholder="Search Name Or Email"
                                                   class="form-control" autocomplete="on">
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div> -->
                        <tbody>
                        {% for log in logs.data %}
                        <tr>
                            <td>{{ log.id }}</td>
                            <td>{{ log.user.id }}</td>
                            <td>{{ log.action }}</td>
                            <td>{{ log.params }}</td>
                            <td>{{ log.type }}</td>
                            <td>{{ date('Y-m-d H:i:s',log.time) }}</td>
                            <td class="actions">
                                <a href="{{ url('system.log.del', '')}}?id={{ log.id }}" class="on-default remove-row"
                                   data-toggle="tooltip" data-placement="top" title=""
                                   data-original-title="Click Delete"><i class="fa fa-trash-o"></i></a>
                            </td>
                        </tr>
                        {% endfor %}
                        </tbody>
                        <tfoot>
                        <tr class="active">
                            <td colspan="5">
                                <div class="text-right">
                                    <ul class="pagination pagination-split justify-content-end footable-pagination m-t-10 m-b-0"></ul>
                                </div>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>

        <nav>
            <ul class="pagination pagination-split">
                {% if logs.cur > 0 %}
                <li class="page-item" >
                    <a class="page-link" href="{{ url('system.log.list', '')}}?page={{ logs.prev }}" aria-label="Previous">
                        <span aria-hidden="true">«</span>
                        <span class="sr-only">Previous</span>
                    </a>
                </li>
                {% endif %}
                <!-- <li class="page-item"><a class="page-link" href="#">1</a></li>
                <li class="page-item active"><a class="page-link" href="#">2</a></li>
                <li class="page-item"><a class="page-link" href="#">3</a></li>
                <li class="page-item"><a class="page-link" href="#">4</a></li>
                <li class="page-item"><a class="page-link" href="#">5</a></li> -->
                {% if logs.cur < logs.totalPages %} 
                <li class="page-item" >
                    <a class="page-link" href="{{ url('system.log.list', '')}}?page={{ logs.next }}" aria-label="Next">
                        <span aria-hidden="true">»</span>
                        <span class="sr-only">Next</span>
                    </a>
                </li>
                {% endif %}
            </ul>
        </nav>
        <!-- end row -->

    </div> <!-- end container -->
</div>
<!-- end wrapper -->

{% include "../../footer.html" %}
